session
对象为
Servlet API的 HttpSession 类的实体
class UserController { def logout = { log.info "User agent: " + request.getHeader("User-Agent") session.invalidate() redirect(action:"login") } def login = { } }
def user = session["user"]session["user"] = "John" asset "John" == session.user